package edu.stu.cs.software.family.favoriteshop.domain;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import edu.stu.cs.software.family.base.domain.BaseTreeEntity;

/**
 * @author Administrator
 *
 */
@Table(name = "O_FAVORITESHOP_STORE")
@Entity
@NamedQueries({ @NamedQuery(name = "Store.getRoot", query = "select g from Store g where g.parent is null") })
public class Store extends BaseTreeEntity<Store, Long>{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Column(name = "ADDRESS")
	String address;
	@Column(name = "PHONE")
	String Phone;
	@Column(name = "STORENAME")
	String storeName;
	
<<<<<<< HEAD
	@Column(name="shopName") 
	String shopName;

	

	public String getShopName() {
		return shopName;
=======
	
	@OneToMany(mappedBy = "store", cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
	Set<Favorite> favorites;
	public String getAddress() {
		return address;
>>>>>>> origin/master
	}

	public void setAddress(String address) {
		this.address = address;
	}
	public String getPhone() {
		return Phone;
	}
	public void setPhone(String phone) {
		Phone = phone;
	}
	public String getStoreName() {
		return storeName;
	}
	

	public void setStoreName(String storeName) {
		this.storeName = storeName;
	}


}